<template>
    <div>
        <div class="weui-cells">
            <div class="weui-cell weui-cell_access">
                <div class="weui-cell__bd" @click="actionSheet">头像</div>
                <div class="weui-cell__ft">
                    <div class="logo">
                        <img src="" />
                    </div>
                </div>
            </div>
            <div class="weui-cell weui-cell_access" @click="actionName">
                <div class="weui-cell__bd">昵称</div>
                <div class="weui-cell__ft">
                    水灵0311
                </div>
            </div>
        </div>
        <div class="action-sheet">
            <div class="weui-mask" id="iosMask" :style="show_weui_mask?'opacity: 1;':'opacity: 0;display:none'" @click="actionSheet"></div>
            <div class="weui-actionsheet" :class="show_weui_mask?'weui-actionsheet_toggle':''" id="iosActionsheet">
                <!-- div class="weui-actionsheet__title">
                <p class="weui-actionsheet__title-text">这是一个标题，可以为一行或者两行。</p>
            </div> -->
                <div class="weui-actionsheet__menu">
                    <div class="weui-actionsheet__cell">拍照</div>
                    <div class="weui-actionsheet__cell">从相册获取</div>
                    <div class="weui-actionsheet__cell">示例菜单</div>
                </div>
                <div class="weui-actionsheet__action">
                    <div class="weui-actionsheet__cell" id="iosActionsheetCancel" @click="actionSheet">取消</div>
                </div>
            </div>
        </div>
        <div class="edit-name" :style="show_edit_name?'top:0':''">
            <div class="weui-cell mt-40" style="padding:0">
                <div class="weui-cell__bd">
                    <input class="weui-input" type="number" pattern="[0-9]*" value="weui input error" placeholder="请输入卡号">
                </div>
                <div class="weui-cell__ft" @click="actionName">
                    x
                </div>
            </div>
        </div>
    </div>
</template>
<script type="text/javascript">
    export default {
        data() {
            return {
                show_weui_mask: false,
                show_edit_name: false
            }
        },
        methods: {
            actionSheet() {
                this.show_weui_mask = !this.show_weui_mask
            },
            actionName() {
                this.show_edit_name = !this.show_edit_name
            }
        }
    }
</script>
<style lang='scss' scoped>
    @import '@/css/actionsheet.scss';
    $bg1:RGBA(93, 81, 116, 1);
    .weui-cells {
        padding-left: 40px;
        background-color: #FFFFFF;
        font-size: 34px;
        overflow: hidden;
        position: relative;
    }

    .weui-cell {
        padding: 30px 40px;
        position: relative;
        display: -webkit-box;
        display: -webkit-flex;
        display: flex;
        -webkit-box-align: center;
        -webkit-align-items: center;
        align-items: center;
    }

    .weui-cell__bd {
        -webkit-box-flex: 1;
        -webkit-flex: 1;
        flex: 1;
        color: $bg1;
    }

    .weui-cell_access {
        -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
        color: inherit;
    }

    .weui-cell__ft {
        text-align: right;
        color: #808080;
    }

    .weui-cell_access .weui-cell__ft {
        padding-right: 36px;
        position: relative;
    }

    .weui-cell_access .weui-cell__ft:after {
        content: " ";
        display: inline-block;
        height: 12px;
        width: 12px;
        border-width: 4px 4px 0 0;
        border-color: #C8C8CD;
        border-style: solid;
        -webkit-transform: matrix(0.71, 0.71, -0.71, 0.71, 0, 0);
        transform: matrix(0.71, 0.71, -0.71, 0.71, 0, 0);
        position: relative;
        top: -4px;
        position: absolute;
        top: 50%;
        margin-top: -8px;
        right: 4px;
    }

    .weui-cell:before {
        content: " ";
        position: absolute;
        left: 0;
        bottom: 0;
        right: 0;
        /* height: 1px; */
        border-top: 1px solid #e5e5e5;
        color: #e5e5e5;
        -webkit-transform-origin: 0 0;
        transform-origin: 0 0;
        -webkit-transform: scaleY(0.5);
        transform: scaleY(0.5);
        left: 15px;
        z-index: 2;
    }

    .logo {
        width: 90px;
        height: 90px;
        background-color: #e5e5e5;
        border-radius: 100%;
    }

    .edit-name {
        height: 100%;
        width: 100%;
        position: absolute;
        top: 10000px;
        left: 0;
        background-color: #f8f8f8;
        transition: all 0.3s;
        z-index: 99999999999999;
    }

    .weui-input {
        width: 100%;
        border: 0;
        outline: 0;
        -webkit-appearance: none;
        background-color: transparent;
        font-size: inherit;
        color: inherit;
        height: 1.47058824em;
        line-height: 1.47058824;
        background-color: #FFFFFF;
    }
</style>